package com.zzf.concurrent.example.design.pattern.active.object;

import com.zzf.concurrent.example.design.pattern.active.object.client.MarkStringClientThread;
import com.zzf.concurrent.example.design.pattern.active.object.client.PrintStringClientThread;

/**
 * @author GaoFeng2017
 * @date 2019/9/11 15:09
 */
public class App {
    public static void main(String[] args) {
        ActiveObject activeObject = ActiveObjectFactory.getInstance().createActiveObject();
        MarkStringClientThread markStringClientThread =
                new MarkStringClientThread(activeObject, 1, 'a');

        PrintStringClientThread printStringClientThread =
                new PrintStringClientThread(activeObject, "Bob");

        markStringClientThread.start();
        printStringClientThread.start();
    }
}
